/**
 * 
 */
package com.socialnetwork.user.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.socialnetwork.user.dao.UserDAO;
import com.socialnetwork.user.model.User;

/**
 * @author asoundar
 * 
 */
@Service
@Transactional
public class UserServiceImpl implements UserService {
	@Autowired
	private UserDAO userDAO;

	public void addUser(User user) {
		userDAO.addUser(user);
	}

	public List<User> listUser() {

		return userDAO.listUser();
	}

	public void removeUser(Integer id) {
		userDAO.removeUser(id);
	}
	
	public User getUser(String email) {
		 
		return userDAO.getUser(email);
	}
	
	public int authenticateByEmailAddress(String emailAddress, String password) {
		 
		return userDAO.authenticateByEmailAddress(emailAddress, password);
	}
	
}